

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author linos
 */
@ManagedBean(name = "menu")
@RequestScoped
public class Menu {

    public Menu() {
    }

    public String menu(String s) {
        String str = ((HttpServletRequest) FacesContext.getCurrentInstance()
                .getExternalContext().getRequest()).getRequestURI();
        if(str.contains(s))
        return "active";
        return"";
    }
}
